package com.leonardo.beanme.metadatahandlers;

import org.xml.sax.Attributes;

import com.leonardo.beanme.fields.InputField;
import com.leonardo.beanme.metadatahandlers.BeanXmlReader.FormHandler;
import com.leonardo.beanme.model.BeanForm;

public abstract class TagHandler {
	
	protected FormHandler owner;
	
	public abstract String getTagName();
	
	public void startTag(Attributes attributes){}
	
	public void characters(char[] ch, int start, int lenght){}
	
	public void endTag() {
		owner.getFieldInfo().addHandler(this);
	}
	
	public void handle(InputField field, BeanForm form) {}
	
	public void setOwner(FormHandler owner) {
		this.owner = owner;
	}
	
}
